package com.alinesno.cloud.base.logger.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;


/**
 * <p>
 * SQL运行
 * </p>
 *
 * @author WeiXiaoJin
 * @since 2020-01-26 09:30:11
 */
@Entity
@Table(name="log_sql")
public class LogSqlEntity extends BaseWatcherEntity {

    private static final long serialVersionUID = 1L;

    /**
     * SQL内容
     */
	@Column(name="sql_content" , length = 2048)
	private String sqlContent;
    /**
     * 执行数
     */
	@Column(name="active_count")
	private Integer activeCount;
    /**
     * 执行时间
     */
	@Column(name="active_time")
	private Integer activeTime;
    /**
     * 事务中
     */
	@Column(name="transation_count")
	private Integer transationCount;
    /**
     * 错误数
     */
	@Column(name="error_count")
	private Integer errorCount;
    /**
     * 更新数
     */
	@Column(name="update_count")
	private Integer updateCount;
    /**
     * 读取行数
     */
	@Column(name="result_count")
	private Integer resultCount;
    /**
     * 并发数
     */
	@Column(name="thread_count")
	private Integer threadCount;
    /**
     * 最慢
     */
	@Column(name="max_slow")
	private String maxSlow;
    /**
     * 数据库类型
     */
	@Column(name="db_type")
	private String dbType;
    /**
     * 数据库链接
     */
	@Column(name="db_url")
	private String dbUrl;
    /**
     * 最大运行时间 
     */
	@Column(name="execute_millis_max")
	private String executeMillisMax;
    /**
     * 总的时间执行数
     */
	@Column(name="execute_millis_total")
	private String executeMillisTotal;


	public String getSqlContent() {
		return sqlContent;
	}

	public void setSqlContent(String sqlContent) {
		this.sqlContent = sqlContent;
	}

	public Integer getActiveCount() {
		return activeCount;
	}

	public void setActiveCount(Integer activeCount) {
		this.activeCount = activeCount;
	}

	public Integer getActiveTime() {
		return activeTime;
	}

	public void setActiveTime(Integer activeTime) {
		this.activeTime = activeTime;
	}

	public Integer getTransationCount() {
		return transationCount;
	}

	public void setTransationCount(Integer transationCount) {
		this.transationCount = transationCount;
	}

	public Integer getErrorCount() {
		return errorCount;
	}

	public void setErrorCount(Integer errorCount) {
		this.errorCount = errorCount;
	}

	public Integer getUpdateCount() {
		return updateCount;
	}

	public void setUpdateCount(Integer updateCount) {
		this.updateCount = updateCount;
	}

	public Integer getResultCount() {
		return resultCount;
	}

	public void setResultCount(Integer resultCount) {
		this.resultCount = resultCount;
	}

	public Integer getThreadCount() {
		return threadCount;
	}

	public void setThreadCount(Integer threadCount) {
		this.threadCount = threadCount;
	}

	public String getMaxSlow() {
		return maxSlow;
	}

	public void setMaxSlow(String maxSlow) {
		this.maxSlow = maxSlow;
	}

	public String getDbType() {
		return dbType;
	}

	public void setDbType(String dbType) {
		this.dbType = dbType;
	}

	public String getDbUrl() {
		return dbUrl;
	}

	public void setDbUrl(String dbUrl) {
		this.dbUrl = dbUrl;
	}

	public String getExecuteMillisMax() {
		return executeMillisMax;
	}

	public void setExecuteMillisMax(String executeMillisMax) {
		this.executeMillisMax = executeMillisMax;
	}

	public String getExecuteMillisTotal() {
		return executeMillisTotal;
	}

	public void setExecuteMillisTotal(String executeMillisTotal) {
		this.executeMillisTotal = executeMillisTotal;
	}


	@Override
	public String toString() {
		return "LogSqlEntity{" +
			"sqlContent=" + sqlContent +
			", activeCount=" + activeCount +
			", activeTime=" + activeTime +
			", transationCount=" + transationCount +
			", errorCount=" + errorCount +
			", updateCount=" + updateCount +
			", resultCount=" + resultCount +
			", threadCount=" + threadCount +
			", maxSlow=" + maxSlow +
			", dbType=" + dbType +
			", dbUrl=" + dbUrl +
			", executeMillisMax=" + executeMillisMax +
			", executeMillisTotal=" + executeMillisTotal +
			"}";
	}
}
